import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: '/home'
  },
  
  // 首页
  {
    path: '/home',
    name: 'home',
    component: () => import('@/views/home/index.vue'),
  },
  {
    path:'/scenic',
    name:'景区',
    component:()=>import('@/views/home/scenic/index.vue')
  },
  {
    path:'/scenicDetail',
    name:'景区详情',
    component:()=>import('@/views/home/scenic/scenicDetail.vue')
  },
  // 旅游资源
  {
    path: '/resources',
    name: '旅游资源',
    component: () => import('@/views/home/resources/index.vue'),
  },
  // 路况
  {
    path:'/road',
    name:'交通路况',
    component:()=>import('@/views/road/index.vue')
  },
  // 客流
  {
    path:'/flow',
    name:'交通路况',
    component:()=>import('@/views/flow/index.vue')
  },
   // 气象环保
   {
    path:'/weather',
    name:'气象环保',
    component:()=>import('@/views/weather/index.vue')
  },
  // 气象详情
   {
    path:'/weatherInfo',
    name:'气象详情',
    component:()=>import('@/views/weather/weatherInfo.vue')
  },
  // 上报
  {
    path:'/report',
    name:'上报',
    component:()=>import('@/views/report/index.vue')
  },
  // 行程
  {
    path: '/trip',
    name: '行程',
    component: () => import( '@/views/trip/index.vue')
  },
   // 行程详情
   {
    path: '/tripDetail',
    name: '行程详情',
    component: () => import( '@/views/trip/tripDetail.vue')
  },
  // 创建行程
  {
    path: '/creatTrip',
    name: '创建行程',
    component: () => import( '@/views/trip/creatTrip.vue')
  },
  // 行程设置
  {
    path: '/tripSet',
    name: '行程设置',
    component: () => import( '@/views/trip/tripSet.vue')
  },
  // 我的行程
  {
    path: '/myTrip',
    name: '我的行程',
    component: () => import( '@/views/trip/myTrip.vue')
  },
  // 企业榜单
  {
    path: '/list',
    name: '企业榜单',
    component: () => import( '@/views/list/index.vue')
  },
  // 企业评价
  {
    path: '/valuation',
    name: '企业评价',
    component: () => import( '@/views/list/valuation.vue')
  },
  // 数据报告
  {
    path: '/dataReport',
    name: '数据报告',
    component: () => import( '@/views/dataReport/index.vue')
  },
  // 数据报告详情
  {
    path: '/reportDetail',
    name: '数据报告',
    component: () => import( '@/views/dataReport/detail.vue')
  },
  // 个人中心
  {
    path: '/mine',
    name: '我的',
    component: () => import( '@/views/mine/index.vue')
  },
  // 我的投诉
  {
    path: '/complaints',
    name: '我的投诉',
    component: () => import( '@/views/mine/complaints.vue')
  },
]

const router = new VueRouter({
  mode: 'hash',
  base: process.env.BASE_URL,
  routes
})

export default router
